package eight.test_8_7;

import java.util.Scanner;

public class TestMain1 {
    public static int count = 0;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        for (int i = 1; i <= n; i++) {
            dfs(i,n,m - 1);
            count %= 109;
        }
        System.out.println(count);
    }
    private static void dfs(int cur,int n,int m) {
        if(m <= 0) {
            count++;
            return;
        }
        for(int i = 1; i <= n; i++) {
            if(cur != i) {
                m--;
                dfs(i,n,m);
                m++;
            }
        }
    }
}
